package jgl.vajra.kingkong.part.vehicle.model;


import java.util.List;

import io.reactivex.Observable;
import jgl.vajra.kingkong.bean.CommonAddressBean;
import jgl.vajra.kingkong.part.vehicle.contract.CommonAddressContract;
import jgl.vajra.kingkong.widget.manager.RxJavaHttpManager;
import jgl.vajra.kingkong.widget.manager.retrofit.RetrofitJsonManager;

public class CommonAddressModel extends CommonAddressContract.Model {
    @Override
    public Observable<List<CommonAddressBean>> getAddressList(String authorization) {
        return RetrofitJsonManager.getInstance().getApiService().getAddressList(authorization)
                .compose(RxJavaHttpManager.applyTransformer());
    }

    @Override
    public Observable<String> deleteAddress(String authorization, long id) {
        return RetrofitJsonManager.getInstance().getApiService().deleteAddress(authorization,id)
                .compose(RxJavaHttpManager.applyTransformer());
    }
}
